﻿'using System.Reflection

Public Class Form1

    Public Function fab(i As Integer)

        If i = 1 Or i = 2 Then

            Return 1

        Else

            Return fab(i - 1) + fab(i - 2)

        End If
    End Function


    Private Sub do1()

        'Dim m = New SoundPlayer

        'Dim m = "ddd"
        'Dim vi As Single





        'Dim a = {1, 2, 3}
        'Dim i As New ArrayList
        'i.Add(1)
        'i.Add(1)
        'i.Add(1)
        'For Each ii In i
        '    Me.Label1.Text += ii.ToString()
        'Next



        'Dim dt = New DataTable()
        'Dim dc = New DataColumn("id")
        'Dim dc1 = New DataColumn("value")
        'dt.Columns.Add(dc)
        'dt.Columns.Add(dc1)

        'For i = 1 To 9

        '    dt.Rows.Add({i, i * i})
        '    '//dt.Rows.Add(new object[] { i, HttpUtility.HtmlEncode("<a href='1.htm'>i * i</a>") })
        'Next


        'Dim i = {1, 2, 3}
        'Me.DataGridView1.DataSource = i
        'Me.DataGridView1.DataBindings()

        'region


        'endregion


        'Dim encode = System.Text.Encoding.UTF8
        'Dim strInFile = "111"
        'Dim strDes = "1.txt"

        'Dim sw = New System.IO.StreamWriter(strDes, False, encode)
        'sw.Write(strInFile)
        'sw.Flush()
        'sw.Close()

        'System.Diagnostics.Process.Start("1.txt")
        'Dim i = 1
        'Dim ii = 1
        'MessageBox.Show(i = 1)

        'Me.Label1.Text = Application.StartupPath

        'Me.Label1.Text = fab(4)

        'Me.Label1.Text = System.DateTime.Now.ToString()

        'Dim objBitmap As Bitmap
        'Dim objGraphics As Graphics

        'objBitmap = New Bitmap(200, 200)
        'objGraphics = Graphics.FromImage(objBitmap)

        'objGraphics.DrawLine(New Pen(Color.Red), 0, 0, 200, 200)

        'objBitmap.Save("1.jpg")
        'Me.PictureBox1.Image = New Bitmap("1.jpg")

        'objBitmap.Dispose()
        'objGraphics.Dispose()

        'Dim a
        'a = "222"
        'MessageBox.Show(a)

        'Dim array = {2, 3, 1}
        ''MessageBox.Show(array(0))
        'For i = 0 To 2

        '    For j = i To 2

        '        If array(i) > array(j) Then


        '            Dim temp = array(i)
        '            array(i) = array(j)
        '            array(j) = temp
        '        End If
        '    Next

        'Next
        ''foreach(int i in array){
        ''Response.Write(i)}

        'For Each a In array
        '    Me.Label1.Text += a.ToString()
        'Next




    End Sub

    Protected Overrides Sub OnPaint(e As PaintEventArgs)

        Dim font = New Font("黑体", 28)
        Dim bluepen = New SolidBrush(Color.Blue)
        'SolidBrush blackpen = new SolidBrush(Color.Black)
        'e.Graphics.DrawString("VC#",font,blackpen,65,25)
        e.Graphics.DrawString("VC#", font, bluepen, 61, 21)

        MyBase.OnPaint(e)
    End Sub

    Public Function fib(i)
        If i = 1 Or i = 2 Then
            Return 1
        Else
            Return fib(i - 1) + fib(i - 2)
        End If

    End Function


    ''' <summary>
    ''' 
    ''' </summary>
    ''' <param name="sender"></param>
    ''' <param name="e"></param>
    ''' <remarks></remarks>
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

        Dim c = New cat()
        c.name = "tom"
        Dim i = c.eat()
        MessageBox.Show(i.ToString() + c.name)

        'MessageBox.Show(fib(4))

        'Dim b As System.Diagnostics.Process
        'b.Start("nodepad")

        'Try
        '    Dim m = New System.Media.SoundPlayer("E:\KwDownload\song\莫大人&萱草-我的同学是个骚包(酷我音乐调频Vol.50)(Live).mp3")
        '    m.Play()
        'Catch ex As Exception
        '    MessageBox.Show(ex.ToString())
        'End Try






        'Call do1()


        'Dim s As String
        's = "sss"
        'MessageBox.Show(s)

        'Dim intIndex As String
        'Dim s = "*"
        'Me.Label1.Text = ""
        'For i = 0 To 10

        '    For j = 0 To i
        '        Me.Label1.Text = Me.Label1.Text + s
        '    Next
        '    Me.Label1.Text = Me.Label1.Text + vbCrLf

        'Next


        'MsgBox("没找到")
        'MsgBox(AppDomain.Path())
        'Dim i = 0
        'MessageBox.Show(i)

        'Dim ii = New List(Of Integer)
        'ii.Add(1)
        'ii.Add(2)
        'ii.Add(3)

        'For Each m In ii
        '    MessageBox.Show(m)
        'Next

        'Try
        '    i = 3 / i
        'Catch
        'End Try

        'Dim s = New student()
        'With s
        '    .name = "a"
        '    .no = 1
        'End With
        'Label1.Text = s.name + s.no.ToString()
    End Sub
#Region "111"
#End Region
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        'Dim i = Guid.NewGuid()
        'Me.Label1.Text = i.ToString()
        'Dim s = New JavaScriptSerializer()


        'Dim type = System.Type.GetTypeFromProgID("MSScriptControl.ScriptControl")
        'Dim script = System.Activator.CreateInstance(type)
        'type.InvokeMember("language", System.Reflection.BindingFlags.SetProperty, Nothing, script, {"JavaScript"})
        'Dim a = type.InvokeMember("AddCode", System.Reflection.BindingFlags.InvokeMethod, Nothing, script, {"function test(){return 1  return new Date().getTime().toString(36)}"})

        'a = type.InvokeMember("Run", System.Reflection.BindingFlags.InvokeMethod, Nothing, script, {"test"}).ToString()
        'Me.Label1.Text = a



    End Sub
End Class

Public Class student
    Public no
    Public name
End Class

Class student1
    Inherits student


End Class

